package com.kedou.app;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

/**
 * 注册投资人账号 界面
 * 
 * @author zc
 * 
 */
public class RegistInvestorActivity extends BaseActivity implements
		OnClickListener {
	/**
	 * "我已满足条件" Textview
	 */
	private TextView mTvMeetthecondition;

	/**
	 * 众筹用户使用协议
	 */
	private TextView mTvProtocol;
	/**
	 * 众筹风险提示
	 */
	private TextView mTvRiskTip;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_registinvestor);
		setTitle(R.string.title_of_registinvestor);
		initView();
		setListener();
	}

	/**
	 * 初始化布局
	 */
	private void initView() {
		mTvMeetthecondition = (TextView) findViewById(R.id.tv_meetthecondition);
		mTvProtocol = (TextView) findViewById(R.id.tv_protocol);
		mTvRiskTip = (TextView) findViewById(R.id.tv_risk_tip);
	}

	/**
	 * 设置监听器
	 */
	private void setListener() {
		mTvMeetthecondition.setOnClickListener(this);
		mTvProtocol.setOnClickListener(this);
		mTvRiskTip.setOnClickListener(this);
	}

	/**
	 * 点击事件
	 * 
	 * @param v
	 *            布局
	 */
	@Override
	public void onClick(View v) {
		Intent intent = null;
		switch (v.getId()) {
		case R.id.tv_meetthecondition:
			intent = new Intent(this, PersonalInformationActivity.class);
			this.startActivity(intent);
			break;
		case R.id.tv_protocol:
			intent = new Intent(this, PromptActivity.class);
			intent.putExtra("prompt",
					getResources().getString(R.string.protocol));
			this.startActivity(intent);
			break;
		case R.id.tv_risk_tip:
			intent = new Intent(this, PromptActivity.class);
			intent.putExtra("prompt",
					getResources().getString(R.string.risk_tip));
			this.startActivity(intent);
			break;
		}
	}
}
